package com.simosoft.unitime;


import org.simosoft.unitime.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.Window;
import android.widget.ImageView;

import com.simosoft.unitime.Intents.CorsiIntent;
import com.simosoft.unitime.Intents.DocentiIntent;
import com.simosoft.unitime.Intents.LibrettoIntent;
import com.simosoft.unitime.Intents.MemoIntent;
import com.simosoft.unitime.Intents.StudioIntent;
import com.simosoft.unitime.Intents.UniIntent;


public class LauncherActivity extends Activity {
	/** Called when the activity is first created. */
	private ImageView img1, img2, img3, img4, img5, img6;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setWindow();
		collegaView();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = new MenuInflater(this);
		inflater.inflate(R.menu.launcher_menu, menu);
		return true;
	}

	private void collegaView() {
		img1 = (ImageView) findViewById(R.id.imageView1);
		img2 = (ImageView) findViewById(R.id.imageView2);
		img3 = (ImageView) findViewById(R.id.imageView3);
		img4 = (ImageView) findViewById(R.id.imageView4);
		img5 = (ImageView) findViewById(R.id.imageView5);
		img6 = (ImageView) findViewById(R.id.imageView6);

		img1.setOnClickListener(new LibrettoIntent(this));
		img2.setOnClickListener(new CorsiIntent(this));
		img3.setOnClickListener(new DocentiIntent(this));
		img4.setOnClickListener(new StudioIntent(this));
		img5.setOnClickListener(new MemoIntent(this));
		img6.setOnClickListener(new UniIntent(this));
	}

	private void setWindow() {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.launcher);
	}

}